Documentation for class graphic

Inherits from 	complex_object 

Properties declared in graphic 
	autoresize_bottom_margin 
	autoresize_height 
	autoresize_left_margin 
	autoresize_right_margin 
	autoresize_top_margin 
	autoresize_width 
	slide 
	tag 
	window 

Class Methods declared in graphic 
	new 

Methods declared in graphic 
	action 
		center_in_slide 
		remove 
	any 
		autoresize_bottom_margin 
		autoresize_height 
		autoresize_left_margin 
		autoresize_right_margin 
		autoresize_top_margin 
		autoresize_width 
		center_in_slide 
		convert_x(x, from_slide) 
		convert_y(y, from_slide) 
		cursor_x 
		cursor_y 
		display 
		mouse_down 
		mouse_dragged 
		mouse_up 
		move(x, y) 
		move_by(dx, dy) 
		print_postscript 
		remove 
		remove_with_effect(effect, speed) 
		set_autoresize_bottom_margin(boolean) 
		set_autoresize_height(boolean) 
		set_autoresize_left_margin(boolean) 
		set_autoresize_right_margin(boolean) 
		set_autoresize_top_margin(boolean) 
		set_autoresize_width(boolean) 
		set_tag(symbol) 
		slide 
		tag 
		window 
	autoresizing 
		autoresize_bottom_margin 
		autoresize_height 
		autoresize_left_margin 
		autoresize_right_margin 
		autoresize_top_margin 
		autoresize_width 
		set_autoresize_bottom_margin(boolean) 
		set_autoresize_height(boolean) 
		set_autoresize_left_margin(boolean) 
		set_autoresize_right_margin(boolean) 
		set_autoresize_top_margin(boolean) 
		set_autoresize_width(boolean) 
	events 
		mouse_down 
		mouse_dragged 
		mouse_up 
	get 
		autoresize_bottom_margin 
		autoresize_height 
		autoresize_left_margin 
		autoresize_right_margin 
		autoresize_top_margin 
		autoresize_width 
		slide 
		tag 
		window 
	set 
		set_autoresize_bottom_margin(boolean) 
		set_autoresize_height(boolean) 
		set_autoresize_left_margin(boolean) 
		set_autoresize_right_margin(boolean) 
		set_autoresize_top_margin(boolean) 
		set_autoresize_width(boolean) 
		set_tag(symbol) 

Class 
#begin_class
graphic 
The class cell is a subclass of the class complex_object. 
The class graphic is a so-called abstract class. It implements the methods that is shared by all the different graphics in CraftMan. 
Note: You cannot create instances of an abstract class.
Graphics are objects that may be visible in windows. Graphics have a location on the screen and may be clicked on by the user with the mouse. 
Examples of graphics are button, text-field, slide, polygon, picture and slide-show.
#end_class

Properties 

#begin_property
autoresize_bottom_margin 
Stores a boolean value. If it is true the space below the graphic will change if the size of the slide the graphic is located in changes and the autoresize_graphics property of the slide has the value true.
#end_property

#begin_property
autoresize_height 
Stores a boolean value. If it is true the height of the graphic will change if the size of the slide the graphic is located in changes and the autoresize_graphics property of the slide has the value true.
#end_property

#begin_property
autoresize_left_margin 
Stores a boolean value. If it is true the space to the left of the graphic will change if the size of the slide the graphic is located in changes and the autoresize_graphics property of the slide has the value true.
#end_property

#begin_property
autoresize_right_margin 
Stores a boolean value. If it is true the space to the right of the graphic will change if the size of the slide the graphic is located in changes and the autoresize_graphics property of the slide has the value true.
#end_property

#begin_property
autoresize_top_margin 
Stores a boolean value. If it is true the space over the graphic will change if the size of the slide the graphic is located in changes and the autoresize_graphics property of the slide has the value true.
#end_property

#begin_property
autoresize_width 
Stores a boolean value. If it is true the width of the graphic will change if the size of the slide the graphic is located in changes and the autoresize_graphics property of the slide has the value true.
#end_property

#begin_property
slide 
Stores a reference to the slide in which the graphic is located. If the graphic is not located in a slide the value is nil.
#end_property

#begin_property
tag 
Stores a symbol that can be used to identify the cell.
#end_property

#begin_property
window 
Stores a reference to the window in which the graphic is located. If the graphic is not located in a window the value is nil.
#end_property

Methods 

#begin_method
autoresize_bottom_margin 
Returns the autoresize_bottom_margin property of the graphic.
#end_method

#begin_method
autoresize_height 
Returns the autoresize_height property of the graphic.
#end_method

#begin_method
autoresize_left_margin 
Returns the autoresize_left_margin property of the graphic.
#end_method

#begin_method
autoresize_right_margin 
Returns the autoresize_right_margin property of the graphic.
#end_method

#begin_method
autoresize_top_margin 
Returns the autoresize_top_margin property of the graphic.
#end_method

#begin_method
autoresize_width 
Returns the autoresize_width property of the graphic.
#end_method

#begin_method
center_in_slide 
Moves the graphic so it is centered in its slide and redisplays the window. If the graphic is not located in a window the position of the graphic will not change.
Returns self.
#end_method

#begin_method
convert_x(x, from_slide) 
Converts the x coordinate x from the coordinate system of the slide from_slide to the graphic's own coordinate system.
If from_slide is nil the method will convert from the windows coordinate system.
Returns the new x coordinate.
Also see convert_y(y, from_slide)
#end_method

#begin_method
convert_y(y, from_slide) 
Converts the y coordinate y from the coordinate system of the slide from_slide to the graphic's own coordinate system. 
If from_slide is nil the method will convert from the windows coordinate system.
Returns the new y coordinate.
Also see convert_x(x, from_slide)
#end_method

#begin_method
cursor_x 
Returns the x coordinate of the cursor location in the the graphic's own coordinate system.
Also see cursor_y
#end_method

#begin_method
cursor_y 
Returns the y coordinate of the cursor location in the the graphic's own coordinate system.
Also see cursor_x
#end_method

#begin_method
display 
Redraws the graphic. If you have been drawing with methods like draw_line and fill_rect, those drawings will disappear.
#end_method

#begin_method
mouse_down 
This method does not do anything. The message is sent to the graphic when the cursor is over it and the mouse-button is pressed. 
During a dragging session the graphic will first receive a mouse_down message, then a number of mouse_dragged messages and finally a mouse_up message. 
Specialize the method to get the desired behavior. 
Returns self.
Also see mouse_dragged and mouse_up.
#end_method

#begin_method
mouse_dragged 
This method does not do anything. The message is sent to the graphic each time the cursor is moved with the mouse-button pressed. 
During a dragging session the graphic will first receive a mouse_down message, then a number of mouse_dragged messages and finally a mouse_up message. 
Specialize the method to get the desired behavior. 
Returns self.
Also see mouse_down and mouse_up.
#end_method

#begin_method
mouse_up 
This method does not do anything. The message is sent to the graphic when the mouse-button is released. 
Specialize the method to get the desired behavior. 
During a dragging session the graphic will first receive a mouse_down message, then a number of mouse_dragged messages and finally a mouse_up message. 
Returns self.
Also see mouse_down and mouse_dragged.
#end_method

#begin_method
move(x, y) 
Moves the graphic so that the origin of the graphic is placed at (x, y) and redisplays the window. The coordinates are in the coordinate system of the slide where the graphic is located.
Returns self.
#end_method

#begin_method
move_by(dx, dy) 
Moves the graphic so that the origin of the graphic is moved by (dx, dy) and redisplays the window. The coordinates are in the coordinate system of the slide where the graphic is located.
Returns self.
#end_method

#begin_method
print_postscript 
Prints the PostScript representation of the graphic on a printer. 
Returns self.
#end_method

#begin_method
remove 
Removes the graphic from the slide where it is located and redisplays the window.
Returns self.
Note: The graphic still exists and can be put on another slide using the add_graphic(graphic) message. To remove an object permanently you have to send a destroy message to the object.
Also see remove_with_effect(effect, speed) and add_graphic(graphic) (slide).
#end_method

#begin_method
remove_with_effect(effect, speed) 
Removes the graphic from the slide where it is located using the visual effect effect and the effect-speed speed and redisplays the window. The different effects are:
#no_effect
#dissolve
#wipe_left
#wipe_left_and_dissolve
#wipe_right
#wipe_right_and_dissolve
#wipe_up
#wipe_up_and_dissolve
#wipe_down
#wipe_down_and_dissolve
#iris
#door
#curtain
Returns self.
Note: The graphic still exists and can be put on another slide using the add_graphic(graphic) message. To remove an object permanently you have to send a destroy message to the object.
Also see remove and add_graphic(graphic) (slide).
#end_method

#begin_method
set_autoresize_bottom_margin(boolean) 
Sets the autoresize_bottom_margin property to boolean.
Returns self.
#end_method

#begin_method
set_autoresize_height(boolean) 
Sets the autoresize_bottom_margin property to boolean.
ReturnsReturns self.
#end_method

#begin_method
set_autoresize_left_margin(boolean) 
Sets the autoresize_left_margin property to boolean.
Returns self.
#end_method

#begin_method
set_autoresize_right_margin(boolean) 
Sets the autoresize_right_margin property to boolean.
Returns self.
#end_method

#begin_method
set_autoresize_top_margin(boolean) 
Sets the autoresize_top_margin property to boolean.
Returns self.
#end_method

#begin_method
set_autoresize_width(boolean) 
Sets the autoresize_width property to boolean.
Returns self.
#end_method

#begin_method
set_tag(symbol) 
Sets the tag property to the symbol symbol. 
Returns self.
#end_method

#begin_method
slide 
Returns the slide property of the slide.
#end_method

#begin_method
tag 
Returns the tag property of the slide.
#end_method

#begin_method
window 
Returns the window property of the slide.
#end_method

Class Methods 

#begin_class_method
new 
You cannot create instances of the class graphic since it is an abstract class.
Ex:
{graphic}:new
raises an exception
Exception:
The message new was sent to the class graphic but graphic is an abstract class which you can't make instances of
#end_class_method